package com.jd.action;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

public class LogoutAction extends ActionSupport{

	@Override
	public String execute() throws Exception {
		HttpSession session = ServletActionContext.getRequest().getSession();
		session.invalidate();
		HttpServletRequest request = ServletActionContext.getRequest();
		request.setAttribute("url", "loginPortal.jsp");
		request.setAttribute("info", "注销成功");
		return SUCCESS;
	}

}
